//
//  MeOpenAccountView.m
//  Ev_Master
//
//  Created by Evan on 2019/7/7.
//  Copyright © 2019 Evan. All rights reserved.
//

#import "MeOpenAccountView.h"

@implementation MeOpenAccountView{
    NSInteger btnIndex;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void)awakeFromNib{
    [super awakeFromNib];
    self.hidden = YES;
     [self.btnRight setAlpha:0.67];
    UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewClick:)];
    [self addGestureRecognizer:tap];
    self.view1.frame = CGRectMake(self.view1.frame.origin.x, 90, self.view1.frame.size.width, self.view1.frame.size.height);
}

-(void)viewClick:(id)sender{
    self.hidden = YES;
}

- (IBAction)btnLeftClick:(id)sender {
    btnIndex = 0;
    [self.btnLeft setAlpha:1];
    [self.btnRight setAlpha:0.67];
    
    self.view1.frame = CGRectMake(self.view1.frame.origin.x, 90, self.view1.frame.size.width, self.view1.frame.size.height);
    self.view2.hidden = YES;
    self.view1.hidden = NO;
}

- (IBAction)btnRightClick:(id)sender {
    btnIndex = 1;
    
    [self.btnLeft setAlpha:0.67];
    [self.btnRight setAlpha:1];
    
    self.view2.frame = CGRectMake(self.view2.frame.origin.x, 90, self.view2.frame.size.width, self.view2.frame.size.height);
    self.view2.hidden = NO;
    self.view1.hidden = YES;
}

- (IBAction)btnNextClick:(id)sender {
    self.blockNext(btnIndex);
}



@end
